package cc.codeshop.aidlserver;

import android.os.RemoteException;


public class LogicInterface  extends ILogicInterface.Stub {

	@Override
	public long invokeSimpleParam(int d, float f, boolean b, String s) throws RemoteException {
		System.out.println(String.format("a = %d, b = %f, c = %b, d = %s",  d, f, b, s));
		return 555L;
	}

	@Override
	public long invokeObjectParam(Person inPerson, Person outPerson, Person inoutPerson) throws RemoteException {
		System.out.println("inPerson = " + inPerson + ", outPerson = " + outPerson + ", inoutPerson = " + inoutPerson);
		inPerson.setName("Yung 1");
		outPerson.setName("Yung 2");
		inoutPerson.setName("Yung 3");
		return 0;
	}

	@Override
	public void invokeWithCallback(String s, ICallback callback) throws RemoteException {
		System.out.println("invokeWithCallback : " + s);
		callback.onInvokeFinished(200, "Invoke come back.");
	}

}
